package Thread2;

/**
 * @Author wangzhipeng
 * @Date 2020-08-21 11:47 上午
 * @Description
 */
public class DoBusinessDemo {
    public static void main(String[] args) {
        DoBusiness doBusiness = new DoBusiness(100);

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                doBusiness.checkNumber();
            }
        });
        thread.start();

        for(int i = 1; i< 1000 ; i++){
            doBusiness.call(i);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }


    }
}
